home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Games / MAME / src / drivers / galivan.c < prev    next >
C/C++ Source or Header  |  2000-05-25  |  46KB  |  1,186 lines

  1. /***************************************************************************
  2.  
  3. TODO:
  4. - Find out how layers are enabled\disabled
  5. - sprite/char priority
  6. - dangar input ports
  7. - wrong title screen in ninjemak
  8. - bit 3 of ninjemak_gfxbank_w, there currently is a kludge to clear text RAM
  9.   but it should really copy stuff from the extra ROM.
  10.  
  11.  
  12. Galivan
  13. (C) 1985 Nihon Bussan
  14.  
  15. driver by
  16.  
  17. Luca Elia (eliavit@unina.it)
  18. Olivier Galibert
  19.  
  20.  
  21. Ninja Emaki (US)
  22. (c)1986 NihonBussan Co.,Ltd.
  23.  
  24. Youma Ninpou Chou (Japan)
  25. (c)1986 NihonBussan Co.,Ltd.
  26.  
  27. Driver by Takahiro Nogi (nogi@kt.rim.or.jp) 1999/12/17 -
  28.  
  29. ***************************************************************************/
  30.  
  31. #include "driver.h"
  32. #include "vidhrdw/generic.h"
  33.  
  34. WRITE_HANDLER( galivan_scrollx_w );
  35. WRITE_HANDLER( galivan_scrolly_w );
  36. WRITE_HANDLER( galivan_videoram_w );
  37. WRITE_HANDLER( galivan_colorram_w );
  38. WRITE_HANDLER( galivan_gfxbank_w );
  39. void galivan_vh_convert_color_prom(unsigned char *palette, unsigned short *colortable,const unsigned char *color_prom);
  40. int galivan_vh_start(void);
  41. void galivan_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh);
  42.  
  43. WRITE_HANDLER( ninjemak_scrollx_w );
  44. WRITE_HANDLER( ninjemak_scrolly_w );
  45. WRITE_HANDLER( ninjemak_gfxbank_w );
  46. int ninjemak_vh_start(void);
  47. void ninjemak_vh_screenrefresh(struct osd_bitmap *bitmap, int full_refresh);
  48.  
  49.  
  50.  
  51. static void galivan_init_machine(void)
  52. {
  53.     unsigned char *RAM = memory_region(REGION_CPU1);
  54.  
  55.     cpu_setbank(1,&RAM[0x10000]);
  56. //    layers = 0x60;
  57. }
  58.  
  59. static WRITE_HANDLER( galivan_sound_command_w )
  60. {
  61.     soundlatch_w(offset,(data << 1) | 1);
  62. }
  63.  
  64. static READ_HANDLER( galivan_sound_command_r )
  65. {
  66.     int data;
  67.  
  68.     data = soundlatch_r(offset);
  69.     soundlatch_clear_w(0,0);
  70.     return data;
  71. }
  72.  
  73. static READ_HANDLER( IO_port_c0_r )
  74. {
  75.   return (0x58); /* To Avoid Reset on Ufo Robot dangar */
  76. }
  77.  
  78.  
  79. /* the scroll registers are memory mapped in ninjemak, I/O ports in the others */
  80. static WRITE_HANDLER( ninjemak_videoreg_w )
  81. {
  82.     switch (offset)
  83.     {
  84.         case    0x0b:
  85.             ninjemak_scrolly_w(0, data);
  86.             break;
  87.         case    0x0c:
  88.             ninjemak_scrolly_w(1, data);
  89.             break;
  90.         case    0x0d:
  91.             ninjemak_scrollx_w(0, data);
  92.             break;
  93.         case    0x0e:
  94.             ninjemak_scrollx_w(1, data);
  95.             break;
  96.         default:
  97.             break;
  98.     }
  99. }
  100.  
  101.  
  102.  
  103. static struct MemoryReadAddress readmem[] =
  104. {
  105.     { 0x0000, 0xbfff, MRA_ROM },
  106.     { 0xc000, 0xdfff, MRA_BANK1 },
  107.     { 0xe000, 0xffff, MRA_RAM },
  108.     { -1 }    /* end of table */
  109. };
  110.  
  111. static struct MemoryWriteAddress writemem[] =
  112. {
  113.     { 0x0000, 0xbfff, MWA_ROM },
  114.     { 0xd800, 0xdbff, galivan_videoram_w, &videoram, &videoram_size },
  115.     { 0xdc00, 0xdfff, galivan_colorram_w, &colorram },
  116.     { 0xe000, 0xe0ff, MWA_RAM, &spriteram, &spriteram_size },
  117.     { 0xe100, 0xffff, MWA_RAM },
  118.     { -1 }    /* end of table */
  119. };
  120.  
  121. static struct MemoryWriteAddress ninjemak_writemem[] =
  122. {
  123.     { 0x0000, 0xbfff, MWA_ROM },
  124.     { 0xd800, 0xd81f, ninjemak_videoreg_w },
  125.     { 0xd800, 0xdbff, galivan_videoram_w, &videoram, &videoram_size },
  126.     { 0xdc00, 0xdfff, galivan_colorram_w, &colorram },
  127.     { 0xe000, 0xe1ff, MWA_RAM, &spriteram, &spriteram_size },
  128.     { 0xe200, 0xffff, MWA_RAM },
  129.     { -1 }    /* end of table */
  130. };
  131.  
  132.  
  133. static struct IOReadPort readport[] =
  134. {
  135.     { 0x00, 0x00, input_port_0_r },
  136.     { 0x01, 0x01, input_port_1_r },
  137.     { 0x02, 0x02, input_port_2_r },
  138.     { 0x03, 0x03, input_port_3_r },
  139.     { 0x04, 0x04, input_port_4_r },
  140.     { 0xc0, 0xc0, IO_port_c0_r }, /* dangar needs to return 0x58 */
  141.     { -1 }    /* end of table */
  142. };
  143.  
  144. static struct IOWritePort writeport[] =
  145. {
  146.     { 0x40, 0x40, galivan_gfxbank_w },
  147.     { 0x41, 0x42, galivan_scrollx_w },
  148.     { 0x43, 0x44, galivan_scrolly_w },
  149.     { 0x45, 0x45, galivan_sound_command_w },
  150. /*    { 0x46, 0x46, IOWP_NOP }, */
  151. /*    { 0x47, 0x47, IOWP_NOP }, */
  152.     { -1 }    /* end of table */
  153. };
  154.  
  155. static struct IOReadPort ninjemak_readport[] =
  156. {
  157.     { 0x80, 0x80, input_port_0_r },
  158.     { 0x81, 0x81, input_port_1_r },
  159.     { 0x82, 0x82, input_port_2_r },
  160.     { 0x83, 0x83, input_port_3_r },
  161.     { 0x84, 0x84, input_port_4_r },
  162.     { 0x85, 0x85, input_port_5_r },
  163.     { -1 }    /* end of table */
  164. };
  165.  
  166. static struct IOWritePort ninjemak_writeport[] =
  167. {
  168.     { 0x80, 0x80, ninjemak_gfxbank_w },
  169.     { 0x85, 0x85, galivan_sound_command_w },
  170. //    { 0x86, 0x86, IOWP_NOP },            // ??
  171. //    { 0x87, 0x87, IOWP_NOP },            // ??
  172.     { -1 }    /* end of table */
  173. };
  174.  
  175.  
  176. static struct MemoryReadAddress sound_readmem[] =
  177. {
  178.     { 0x0000, 0xbfff, MRA_ROM },
  179.     { 0xc000, 0xc7ff, MRA_RAM },
  180.     { -1 }    /* end of table */
  181. };
  182.  
  183. static struct MemoryWriteAddress sound_writemem[] =
  184. {
  185.     { 0x0000, 0xbfff, MWA_ROM },
  186.     { 0xc000, 0xc7ff, MWA_RAM },
  187.     { -1 }    /* end of table */
  188. };
  189.  
  190.  
  191. static struct IOReadPort sound_readport[] =
  192. {
  193. /*    { 0x04, 0x04, IORP_NOP },    value read and *discarded*    */
  194.     { 0x06, 0x06, galivan_sound_command_r },
  195.     { -1 }    /* end of table */
  196. };
  197.  
  198. static struct IOWritePort sound_writeport[] =
  199. {
  200.     { 0x00, 0x00, YM3526_control_port_0_w },
  201.     { 0x01, 0x01, YM3526_write_port_0_w },
  202.     { 0x02, 0x02, DAC_0_data_w },
  203.     { 0x03, 0x03, DAC_1_data_w },
  204.     { -1 }    /* end of table */
  205. };
  206.  
  207.  
  208.  
  209. INPUT_PORTS_START( galivan )
  210.     PORT_START      /* IN0 */
  211.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY )
  212.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY )
  213.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY )
  214.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY )
  215.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
  216.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
  217.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  218.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON3 )
  219.  
  220.     PORT_START      /* IN1 */
  221.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_COCKTAIL )
  222.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_COCKTAIL )
  223.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_COCKTAIL )
  224.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_COCKTAIL )
  225.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_COCKTAIL )
  226.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_COCKTAIL )
  227.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  228.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_COCKTAIL )
  229.  
  230.     PORT_START  /* IN2 - TEST, COIN, START */
  231.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
  232.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
  233.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN1 )
  234.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN2 )
  235.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE1 )
  236.     PORT_BITX(0x20, 0x20, 0, DEF_STR( Service_Mode ), KEYCODE_F2, IP_JOY_NONE )
  237.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  238.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  239.  
  240.     PORT_START    /* IN3 - DSW1 */
  241.     PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) )
  242.     PORT_DIPSETTING(    0x03, "3" )
  243.     PORT_DIPSETTING(    0x02, "4" )
  244.     PORT_DIPSETTING(    0x01, "5" )
  245.     PORT_DIPSETTING(    0x00, "6" )
  246.     PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) )
  247.     PORT_DIPSETTING(    0x0c, "20000 and every 60000" )
  248.     PORT_DIPSETTING(    0x04, "20000 and every 90000" )
  249.     PORT_DIPSETTING(    0x08, "50000 and every 60000" )
  250.     PORT_DIPSETTING(    0x00, "50000 and every 90000" )
  251.     PORT_DIPNAME( 0x10, 0x10, DEF_STR( Demo_Sounds ) )
  252.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  253.     PORT_DIPSETTING(    0x10, DEF_STR( On ) )
  254.     PORT_DIPNAME( 0x20, 0x00, DEF_STR( Cabinet ) )
  255.     PORT_DIPSETTING(    0x00, DEF_STR( Upright ) )
  256.     PORT_DIPSETTING(    0x20, DEF_STR( Cocktail ) )
  257.     PORT_BITX(    0x40, 0x40, IPT_DIPSWITCH_NAME | IPF_CHEAT, "Invulnerability", IP_KEY_NONE, IP_JOY_NONE )
  258.     PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
  259.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  260.     PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
  261.     PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
  262.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  263.  
  264.     PORT_START    /* IN4 - DSW2 */
  265.     PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) )
  266.     PORT_DIPSETTING(    0x01, DEF_STR( 2C_1C ) )
  267.     PORT_DIPSETTING(    0x03, DEF_STR( 1C_1C ) )
  268.     PORT_DIPSETTING(    0x02, DEF_STR( 1C_2C ) )
  269.     PORT_DIPSETTING(    0x00, DEF_STR( Free_Play ) )
  270.     PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_B ) )
  271.     PORT_DIPSETTING(    0x00, DEF_STR( 3C_1C ) )
  272.     PORT_DIPSETTING(    0x04, DEF_STR( 2C_3C ) )
  273.     PORT_DIPSETTING(    0x0c, DEF_STR( 1C_3C ) )
  274.     PORT_DIPSETTING(    0x08, DEF_STR( 1C_6C ) )
  275.     PORT_DIPNAME( 0x10, 0x10, DEF_STR( Difficulty ) )
  276.     PORT_DIPSETTING(    0x10, "Easy" )
  277.     PORT_DIPSETTING(    0x00, "Hard" )
  278.     PORT_DIPNAME( 0x20, 0x20, DEF_STR( Flip_Screen ) )
  279.     PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
  280.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  281.     PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown) )
  282.     PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
  283.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  284.     PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
  285.     PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
  286.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  287. INPUT_PORTS_END
  288.  
  289. /* the last two dip switches are different in each version */
  290. INPUT_PORTS_START( dangar )
  291.     PORT_START      /* IN0 */
  292.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY )
  293.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY )
  294.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY )
  295.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY )
  296.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
  297.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
  298.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  299.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON3 )
  300.  
  301.     PORT_START      /* IN1 */
  302.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_COCKTAIL )
  303.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_COCKTAIL )
  304.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_COCKTAIL )
  305.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_COCKTAIL )
  306.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_COCKTAIL )
  307.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_COCKTAIL )
  308.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  309.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_COCKTAIL )
  310.  
  311.     PORT_START  /* IN2 - TEST, COIN, START */
  312.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
  313.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
  314.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN1 )
  315.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN2 )
  316.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE1 )
  317.     PORT_BITX(0x20, 0x20, 0, DEF_STR( Service_Mode ), KEYCODE_F2, IP_JOY_NONE )
  318.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  319.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  320.  
  321.     PORT_START    /* IN3 - DSW1 */
  322.     PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) )
  323.     PORT_DIPSETTING(    0x03, "3" )
  324.     PORT_DIPSETTING(    0x02, "4" )
  325.     PORT_DIPSETTING(    0x01, "5" )
  326.     PORT_DIPSETTING(    0x00, "6" )
  327.     PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) )
  328.     PORT_DIPSETTING(    0x0c, "20000 and every 60000" )
  329.     PORT_DIPSETTING(    0x04, "20000 and every 90000" )
  330.     PORT_DIPSETTING(    0x08, "50000 and every 60000" )
  331.     PORT_DIPSETTING(    0x00, "50000 and every 90000" )
  332.     PORT_DIPNAME( 0x10, 0x10, DEF_STR( Demo_Sounds ) )
  333.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  334.     PORT_DIPSETTING(    0x10, DEF_STR( On ) )
  335.     PORT_DIPNAME( 0x20, 0x00, DEF_STR( Cabinet ) )
  336.     PORT_DIPSETTING(    0x00, DEF_STR( Upright ) )
  337.     PORT_DIPSETTING(    0x20, DEF_STR( Cocktail ) )
  338.     PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
  339.     PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
  340.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  341.     PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
  342.     PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
  343.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  344.  
  345.     PORT_START    /* IN4 - DSW2 */
  346.     PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) )
  347.     PORT_DIPSETTING(    0x01, DEF_STR( 2C_1C ) )
  348.     PORT_DIPSETTING(    0x03, DEF_STR( 1C_1C ) )
  349.     PORT_DIPSETTING(    0x02, DEF_STR( 1C_2C ) )
  350.     PORT_DIPSETTING(    0x00, DEF_STR( Free_Play ) )
  351.     PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_B ) )
  352.     PORT_DIPSETTING(    0x04, DEF_STR( 2C_1C ) )
  353.     PORT_DIPSETTING(    0x0c, DEF_STR( 1C_1C ) )
  354.     PORT_DIPSETTING(    0x00, DEF_STR( 2C_3C ) )
  355.     PORT_DIPSETTING(    0x08, DEF_STR( 1C_2C ) )
  356.     PORT_DIPNAME( 0x10, 0x10, DEF_STR( Difficulty ) )
  357.     PORT_DIPSETTING(    0x10, "Easy" )
  358.     PORT_DIPSETTING(    0x00, "Hard" )
  359.     PORT_DIPNAME( 0x20, 0x20, DEF_STR( Flip_Screen ) )
  360.     PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
  361.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  362.     /* two switches to allow continue... both work */
  363.         PORT_DIPNAME( 0xc0, 0x00, "Continue" )
  364.         PORT_DIPSETTING(    0xc0, DEF_STR( No ) )
  365.         PORT_DIPSETTING(    0x80, "3 Times" )
  366.         PORT_DIPSETTING(    0x40, "5 Times" )
  367.         PORT_DIPSETTING(    0x00, DEF_STR( Yes ) )
  368. INPUT_PORTS_END
  369.  
  370. /* the last two dip switches are different in each version */
  371. INPUT_PORTS_START( dangar2 )
  372.     PORT_START      /* IN0 */
  373.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY )
  374.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY )
  375.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY )
  376.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY )
  377.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
  378.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
  379.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  380.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON3 )
  381.  
  382.     PORT_START      /* IN1 */
  383.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_COCKTAIL )
  384.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_COCKTAIL )
  385.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_COCKTAIL )
  386.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_COCKTAIL )
  387.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_COCKTAIL )
  388.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_COCKTAIL )
  389.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  390.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_COCKTAIL )
  391.  
  392.     PORT_START  /* IN2 - TEST, COIN, START */
  393.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
  394.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
  395.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN1 )
  396.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN2 )
  397.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE1 )
  398.     PORT_BITX(0x20, 0x20, 0, DEF_STR( Service_Mode ), KEYCODE_F2, IP_JOY_NONE )
  399.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  400.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  401.  
  402.     PORT_START    /* IN3 - DSW1 */
  403.     PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) )
  404.     PORT_DIPSETTING(    0x00, "2" )
  405.     PORT_DIPSETTING(    0x03, "3" )
  406.     PORT_DIPSETTING(    0x02, "4" )
  407.     PORT_DIPSETTING(    0x01, "5" )
  408.     PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) )
  409.     PORT_DIPSETTING(    0x0c, "20000 and every 60000" )
  410.     PORT_DIPSETTING(    0x04, "20000 and every 90000" )
  411.     PORT_DIPSETTING(    0x08, "50000 and every 60000" )
  412.     PORT_DIPSETTING(    0x00, "50000 and every 90000" )
  413.     PORT_DIPNAME( 0x10, 0x10, DEF_STR( Demo_Sounds ) )
  414.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  415.     PORT_DIPSETTING(    0x10, DEF_STR( On ) )
  416.     PORT_DIPNAME( 0x20, 0x00, DEF_STR( Cabinet ) )
  417.     PORT_DIPSETTING(    0x00, DEF_STR( Upright ) )
  418.     PORT_DIPSETTING(    0x20, DEF_STR( Cocktail ) )
  419.     PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown) )
  420.     PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
  421.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  422.     PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown) )
  423.     PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
  424.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  425.  
  426.     PORT_START    /* IN4 - DSW2 */
  427.     PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) )
  428.     PORT_DIPSETTING(    0x01, DEF_STR( 2C_1C ) )
  429.     PORT_DIPSETTING(    0x03, DEF_STR( 1C_1C ) )
  430.     PORT_DIPSETTING(    0x02, DEF_STR( 1C_2C ) )
  431.     PORT_DIPSETTING(    0x00, DEF_STR( Free_Play ) )
  432.     PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_B ) )
  433.     PORT_DIPSETTING(    0x04, DEF_STR( 2C_1C ) )
  434.     PORT_DIPSETTING(    0x0c, DEF_STR( 1C_1C ) )
  435.     PORT_DIPSETTING(    0x00, DEF_STR( 2C_3C ) )
  436.     PORT_DIPSETTING(    0x08, DEF_STR( 1C_2C ) )
  437.     PORT_DIPNAME( 0x10, 0x10, DEF_STR( Difficulty ) )
  438.     PORT_DIPSETTING(    0x10, "Easy" )
  439.     PORT_DIPSETTING(    0x00, "Hard" )
  440.     PORT_DIPNAME( 0x20, 0x20, DEF_STR( Flip_Screen ) )
  441.     PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
  442.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  443.     PORT_BITX(    0x40, 0x40, IPT_DIPSWITCH_NAME | IPF_CHEAT, "Complete Invulnerability", IP_KEY_NONE, IP_JOY_NONE )
  444.     PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
  445.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  446.     PORT_BITX(    0x80, 0x80, IPT_DIPSWITCH_NAME | IPF_CHEAT, "Base Ship Invulnerability", IP_KEY_NONE, IP_JOY_NONE )
  447.     PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
  448.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  449. INPUT_PORTS_END
  450.  
  451. /* the last two dip switches are different in each version */
  452. INPUT_PORTS_START( dangarb )
  453.     PORT_START      /* IN0 */
  454.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY )
  455.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY )
  456.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY )
  457.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY )
  458.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
  459.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
  460.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  461.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON3 )
  462.  
  463.     PORT_START      /* IN1 */
  464.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_COCKTAIL )
  465.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_COCKTAIL )
  466.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_COCKTAIL )
  467.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_COCKTAIL )
  468.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_COCKTAIL )
  469.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_COCKTAIL )
  470.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  471.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_COCKTAIL )
  472.  
  473.     PORT_START  /* IN2 - TEST, COIN, START */
  474.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
  475.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
  476.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN1 )
  477.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN2 )
  478.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE1 )
  479.     PORT_BITX(0x20, 0x20, 0, DEF_STR( Service_Mode ), KEYCODE_F2, IP_JOY_NONE )
  480.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  481.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  482.  
  483.     PORT_START    /* IN3 - DSW1 */
  484.     PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) )
  485.     PORT_DIPSETTING(    0x03, "3" )
  486.     PORT_DIPSETTING(    0x02, "4" )
  487.     PORT_DIPSETTING(    0x01, "5" )
  488.     PORT_DIPSETTING(    0x00, "6" )
  489.     PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) )
  490.     PORT_DIPSETTING(    0x0c, "20000 and every 60000" )
  491.     PORT_DIPSETTING(    0x04, "20000 and every 90000" )
  492.     PORT_DIPSETTING(    0x08, "50000 and every 60000" )
  493.     PORT_DIPSETTING(    0x00, "50000 and every 90000" )
  494.     PORT_DIPNAME( 0x10, 0x10, DEF_STR( Demo_Sounds ) )
  495.     PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
  496.     PORT_DIPSETTING(    0x10, DEF_STR( On ) )
  497.     PORT_DIPNAME( 0x20, 0x00, DEF_STR( Cabinet ) )
  498.     PORT_DIPSETTING(    0x00, DEF_STR( Upright ) )
  499.     PORT_DIPSETTING(    0x20, DEF_STR( Cocktail ) )
  500.     PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown) )
  501.     PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
  502.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  503.     PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown) )
  504.     PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
  505.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  506.  
  507.     PORT_START    /* IN4 - DSW2 */
  508.     PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) )
  509.     PORT_DIPSETTING(    0x01, DEF_STR( 2C_1C ) )
  510.     PORT_DIPSETTING(    0x03, DEF_STR( 1C_1C ) )
  511.     PORT_DIPSETTING(    0x02, DEF_STR( 1C_2C ) )
  512.     PORT_DIPSETTING(    0x00, DEF_STR( Free_Play ) )
  513.     PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_B ) )
  514.     PORT_DIPSETTING(    0x04, DEF_STR( 2C_1C ) )
  515.     PORT_DIPSETTING(    0x0c, DEF_STR( 1C_1C ) )
  516.     PORT_DIPSETTING(    0x00, DEF_STR( 2C_3C ) )
  517.     PORT_DIPSETTING(    0x08, DEF_STR( 1C_2C ) )
  518.     PORT_DIPNAME( 0x10, 0x10, DEF_STR( Difficulty ) )
  519.     PORT_DIPSETTING(    0x10, "Easy" )
  520.     PORT_DIPSETTING(    0x00, "Hard" )
  521.     PORT_DIPNAME( 0x20, 0x20, DEF_STR( Flip_Screen ) )
  522.     PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
  523.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  524.     PORT_BITX(    0x40, 0x40, IPT_DIPSWITCH_NAME | IPF_CHEAT, "Complete Invulnerability", IP_KEY_NONE, IP_JOY_NONE )
  525.     PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
  526.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  527.     PORT_BITX(    0x80, 0x80, IPT_DIPSWITCH_NAME | IPF_CHEAT, "Base Ship Invulnerability", IP_KEY_NONE, IP_JOY_NONE )
  528.     PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
  529.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  530. INPUT_PORTS_END
  531.  
  532. INPUT_PORTS_START( ninjemak )
  533.     PORT_START    /* IN0 */
  534.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY )
  535.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY )
  536.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY )
  537.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY )
  538.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
  539.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
  540.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 )
  541.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  542.  
  543.     PORT_START    /* IN1 */
  544.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_COCKTAIL )
  545.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_COCKTAIL )
  546.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_COCKTAIL )
  547.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_COCKTAIL )
  548.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_COCKTAIL )
  549.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_COCKTAIL )
  550.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_COCKTAIL )
  551.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  552.  
  553.     PORT_START    /* IN2 - TEST, COIN, START */
  554.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
  555.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
  556.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN1 )
  557.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN2 )
  558.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE1 )
  559.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
  560.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  561.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  562.  
  563.     PORT_START    /* IN3 - TEST */
  564.     PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
  565.     PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
  566.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  567.     PORT_SERVICE( 0x02, IP_ACTIVE_LOW )
  568.     PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
  569.     PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
  570.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  571.     PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
  572.     PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
  573.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  574.     PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
  575.     PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
  576.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  577.     PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
  578.     PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
  579.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  580.     PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
  581.     PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
  582.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  583.     PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
  584.     PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
  585.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  586.  
  587.     PORT_START    /* IN4 - TEST */
  588.     PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) )
  589.     PORT_DIPSETTING(    0x03, "3" )
  590.     PORT_DIPSETTING(    0x02, "4" )
  591.     PORT_DIPSETTING(    0x01, "5" )
  592.     PORT_DIPSETTING(    0x00, "6" )
  593.     PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) )
  594.     PORT_DIPSETTING(    0x0c, "20000 and every 60000" )
  595.     PORT_DIPSETTING(    0x08, "50000 and every 60000" )
  596.     PORT_DIPSETTING(    0x04, "20000 and every 90000" )
  597.     PORT_DIPSETTING(    0x00, "50000 and every 90000" )
  598.     PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) )
  599.     PORT_DIPSETTING(    0x10, DEF_STR( 2C_1C ) )
  600.     PORT_DIPSETTING(    0x30, DEF_STR( 1C_1C ) )
  601.     PORT_DIPSETTING(    0x20, DEF_STR( 1C_2C ) )
  602.     PORT_DIPSETTING(    0x00, DEF_STR( Free_Play ) )
  603.     PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coin_B ) )
  604.     PORT_DIPSETTING(    0x40, DEF_STR( 2C_1C ) )
  605.     PORT_DIPSETTING(    0xc0, DEF_STR( 1C_1C ) )
  606.     PORT_DIPSETTING(    0x00, DEF_STR( 2C_3C ) )
  607.     PORT_DIPSETTING(    0x80, DEF_STR( 1C_2C ) )
  608.  
  609.     PORT_START    /* IN5 - TEST */
  610.     PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) )
  611.     PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
  612.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  613.     PORT_DIPNAME( 0x02, 0x00, DEF_STR( Cabinet ) )
  614.     PORT_DIPSETTING(    0x00, DEF_STR( Upright ) )
  615.     PORT_DIPSETTING(    0x02, DEF_STR( Cocktail ) )
  616.     PORT_DIPNAME( 0x04, 0x04, DEF_STR( Difficulty ) )
  617.     PORT_DIPSETTING(    0x04, "Easy" )
  618.     PORT_DIPSETTING(    0x00, "Hard" )
  619.     PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
  620.     PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
  621.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  622.     PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
  623.     PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
  624.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  625.     PORT_DIPNAME( 0x20, 0x20, DEF_STR( Flip_Screen ) )
  626.     PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
  627.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  628.     PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
  629.     PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
  630.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  631.     PORT_DIPNAME( 0x80, 0x80, "Allow Continue" )
  632.     PORT_DIPSETTING(    0x80, DEF_STR( No ) )
  633.     PORT_DIPSETTING(    0x00, DEF_STR( Yes ) )
  634. INPUT_PORTS_END
  635.  
  636. INPUT_PORTS_START( youma )
  637.     PORT_START    /* IN0 */
  638.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY )
  639.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY )
  640.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY )
  641.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY )
  642.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
  643.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
  644.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 )
  645.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  646.  
  647.     PORT_START    /* IN1 */
  648.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    | IPF_8WAY | IPF_COCKTAIL )
  649.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  | IPF_8WAY | IPF_COCKTAIL )
  650.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_8WAY | IPF_COCKTAIL )
  651.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_COCKTAIL )
  652.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_COCKTAIL )
  653.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_COCKTAIL )
  654.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_COCKTAIL )
  655.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  656.  
  657.     PORT_START    /* IN2 - TEST, COIN, START */
  658.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
  659.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
  660.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN1 )
  661.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN2 )
  662.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE1 )
  663.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
  664.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  665.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  666.  
  667.     PORT_START    /* IN3 - TEST */
  668.     PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
  669.     PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
  670.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  671.     PORT_SERVICE( 0x02, IP_ACTIVE_LOW )
  672.     PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
  673.     PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
  674.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  675.     PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
  676.     PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
  677.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  678.     PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
  679.     PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
  680.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  681.     PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
  682.     PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
  683.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  684.     PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
  685.     PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
  686.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  687.     PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
  688.     PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
  689.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  690.  
  691.     PORT_START    /* IN4 - TEST */
  692.     PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) )
  693.     PORT_DIPSETTING(    0x03, "3" )
  694.     PORT_DIPSETTING(    0x02, "4" )
  695.     PORT_DIPSETTING(    0x01, "5" )
  696.     PORT_DIPSETTING(    0x00, "6" )
  697.     PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Bonus_Life ) )
  698.     PORT_DIPSETTING(    0x0c, "20000 and every 60000" )
  699.     PORT_DIPSETTING(    0x08, "50000 and every 60000" )
  700.     PORT_DIPSETTING(    0x04, "20000 and every 90000" )
  701.     PORT_DIPSETTING(    0x00, "50000 and every 90000" )
  702.     PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_A ) )
  703.     PORT_DIPSETTING(    0x10, DEF_STR( 2C_1C ) )
  704.     PORT_DIPSETTING(    0x30, DEF_STR( 1C_1C ) )
  705.     PORT_DIPSETTING(    0x20, DEF_STR( 1C_2C ) )
  706.     PORT_DIPSETTING(    0x00, DEF_STR( Free_Play ) )
  707.     PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coin_B ) )
  708.     PORT_DIPSETTING(    0x40, DEF_STR( 2C_1C ) )
  709.     PORT_DIPSETTING(    0xc0, DEF_STR( 1C_1C ) )
  710.     PORT_DIPSETTING(    0x00, DEF_STR( 2C_3C ) )
  711.     PORT_DIPSETTING(    0x80, DEF_STR( 1C_2C ) )
  712.  
  713.     PORT_START    /* IN5 - TEST */
  714.     PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) )
  715.     PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
  716.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  717.     PORT_DIPNAME( 0x02, 0x00, DEF_STR( Cabinet ) )
  718.     PORT_DIPSETTING(    0x00, DEF_STR( Upright ) )
  719.     PORT_DIPSETTING(    0x02, DEF_STR( Cocktail ) )
  720.     PORT_DIPNAME( 0x04, 0x04, DEF_STR( Difficulty ) )
  721.     PORT_DIPSETTING(    0x04, "Easy" )
  722.     PORT_DIPSETTING(    0x00, "Hard" )
  723.     PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
  724.     PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
  725.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  726.     PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
  727.     PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
  728.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  729.     PORT_DIPNAME( 0x20, 0x20, DEF_STR( Flip_Screen ) )
  730.     PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
  731.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  732.     PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
  733.     PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
  734.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  735.     PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
  736.     PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
  737.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  738. INPUT_PORTS_END
  739.  
  740.  
  741.  
  742. #define CHARLAYOUT(NUM) static struct GfxLayout charlayout_##NUM =  \
  743. {                                                                    \
  744.     8,8,    /* 8*8 characters */                                    \
  745.     NUM,    /* NUM characters */                                    \
  746.     4,    /* 4 bits per pixel */                                        \
  747.     { 0, 1, 2, 3 },                                                    \
  748.     { 1*4, 0*4, 3*4, 2*4, 5*4, 4*4, 7*4, 6*4 },                        \
  749.     { 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32 },                \
  750.     32*8    /* every char takes 32 consecutive bytes */                \
  751. }
  752.  
  753. CHARLAYOUT(512);
  754. CHARLAYOUT(1024);
  755.  
  756. static struct GfxLayout tilelayout =
  757. {
  758.     16,16,
  759.     1024,
  760.     4,
  761.     { 0, 1, 2, 3 },
  762.     { 4,0,12,8,20,16,28,24,36,32,44,40,52,48,60,56 },
  763.     { 0*64, 1*64, 2*64, 3*64, 4*64, 5*64, 6*64, 7*64,
  764.       8*64, 9*64, 10*64, 11*64, 12*64, 13*64, 14*64, 15*64 },
  765.     16*16*4
  766. };
  767.  
  768. #define SPRITELAYOUT(NUM) static struct GfxLayout spritelayout_##NUM =  \
  769. {                                                                        \
  770.     16,16,    /* 16*16 sprites */                                            \
  771.     NUM,    /* NUM sprites */                                            \
  772.     4,    /* 4 bits per pixel */                                            \
  773.     { 0, 1, 2, 3 },                                                        \
  774.     { 1*4, 0*4, 1*4+NUM*64*8, 0*4+NUM*64*8, 3*4, 2*4, 3*4+NUM*64*8, 2*4+NUM*64*8,            \
  775.             5*4, 4*4, 5*4+NUM*64*8, 4*4+NUM*64*8, 7*4, 6*4, 7*4+NUM*64*8, 6*4+NUM*64*8 },    \
  776.     { 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32,                    \
  777.             8*32, 9*32, 10*32, 11*32, 12*32, 13*32, 14*32, 15*32 },        \
  778.     64*8    /* every sprite takes 64 consecutive bytes */                \
  779. }
  780.  
  781. SPRITELAYOUT(512);
  782. SPRITELAYOUT(1024);
  783.  
  784.  
  785. static struct GfxDecodeInfo gfxdecodeinfo[] =
  786. {
  787.     { REGION_GFX1, 0, &charlayout_512,            0,   8 },
  788.     { REGION_GFX2, 0, &tilelayout,             8*16,  16 },
  789.     { REGION_GFX3, 0, &spritelayout_512, 8*16+16*16, 256 },
  790.     { -1 } /* end of array */
  791. };
  792.  
  793. static struct GfxDecodeInfo ninjemak_gfxdecodeinfo[] =
  794. {
  795.     { REGION_GFX1, 0, &charlayout_1024,            0,   8 },
  796.     { REGION_GFX2, 0, &tilelayout,              8*16,  16 },
  797.     { REGION_GFX3, 0, &spritelayout_1024, 8*16+16*16, 256 },
  798.     { -1 } /* end of array */
  799. };
  800.  
  801.  
  802.  
  803. static struct YM3526interface YM3526_interface =
  804. {
  805.     1,
  806.     8000000/2,    /* 4 MHz? */
  807.     { 60 }
  808. };
  809.  
  810. static struct DACinterface dac_interface =
  811. {
  812.     2,
  813.     { 60, 60 }
  814. };
  815.  
  816.  
  817. static struct MachineDriver machine_driver_galivan =
  818. {
  819.     /* basic machine hardware */
  820.     {
  821.         {
  822.             CPU_Z80,
  823.             12000000/2,        /* 6 MHz? */
  824.             readmem,writemem,readport,writeport,
  825.             interrupt,1
  826.         },
  827.         {
  828.             CPU_Z80 | CPU_AUDIO_CPU,
  829.             8000000/2,        /* 4 MHz? */
  830.             sound_readmem,sound_writemem,sound_readport,sound_writeport,
  831.             ignore_interrupt,0,
  832.             interrupt,7250  /* timed interrupt, ?? Hz */
  833.         },
  834.     },
  835.     60,DEFAULT_60HZ_VBLANK_DURATION,
  836.     1,
  837.     galivan_init_machine,
  838.  
  839.     /* video hardware */
  840.     32*8, 32*8, { 0*8, 32*8-1, 2*8, 30*8-1 },
  841.     gfxdecodeinfo,
  842.     256, 8*16+16*16+256*16,
  843.     galivan_vh_convert_color_prom,
  844.  
  845.     VIDEO_TYPE_RASTER,
  846.     0,
  847.     galivan_vh_start,
  848.     0,
  849.     galivan_vh_screenrefresh,
  850.  
  851.     /* sound hardware */
  852.     0,0,0,0,
  853.     {
  854.         {
  855.             SOUND_YM3526,
  856.             &YM3526_interface
  857.         },
  858.         {
  859.             SOUND_DAC,
  860.             &dac_interface
  861.         }
  862.     }
  863. };
  864.  
  865. static struct MachineDriver machine_driver_ninjemak =
  866. {
  867.     /* basic machine hardware */
  868.     {
  869.         {
  870.             CPU_Z80,
  871.             12000000/2,        /* 6 MHz? */
  872.             readmem,ninjemak_writemem,ninjemak_readport,ninjemak_writeport,
  873.             interrupt,1
  874.         },
  875.         {
  876.             CPU_Z80 | CPU_AUDIO_CPU,
  877.             8000000/2,        /* 4 MHz? */
  878.             sound_readmem,sound_writemem,sound_readport,sound_writeport,
  879.             ignore_interrupt,0,
  880.             interrupt,7250    /* timed interrupt, ?? Hz */
  881.         },
  882.     },
  883.     60,DEFAULT_60HZ_VBLANK_DURATION,
  884.     1,
  885.     galivan_init_machine,
  886.  
  887.     /* video hardware */
  888.     32*8, 32*8, { 1*8, 31*8-1, 2*8, 30*8-1 },
  889.     ninjemak_gfxdecodeinfo,
  890.     256, 8*16+16*16+256*16,
  891.     galivan_vh_convert_color_prom,
  892.  
  893.     VIDEO_TYPE_RASTER,
  894.     0,
  895.     ninjemak_vh_start,
  896.     0,
  897.     ninjemak_vh_screenrefresh,
  898.  
  899.     /* sound hardware */
  900.     0,0,0,0,
  901.     {
  902.         {
  903.             SOUND_YM3526,
  904.             &YM3526_interface
  905.         },
  906.         {
  907.             SOUND_DAC,
  908.             &dac_interface
  909.         }
  910.     }
  911. };
  912.  
  913.  
  914.  
  915. /***************************************************************************
  916.  
  917.   Game driver(s)
  918.  
  919. ***************************************************************************/
  920.  
  921. ROM_START( galivan )
  922.     ROM_REGION( 0x14000, REGION_CPU1 )    /* main cpu code */
  923.     ROM_LOAD( "gv1.1b",       0x00000, 0x8000, 0x5e480bfc )
  924.     ROM_LOAD( "gv2.3b",       0x08000, 0x4000, 0x0d1b3538 )
  925.     ROM_LOAD( "gv3.4b",       0x10000, 0x4000, 0x82f0c5e6 ) /* 2 banks at c000 */
  926.  
  927.     ROM_REGION( 0x10000, REGION_CPU2 )        /* sound cpu code */
  928.     ROM_LOAD( "gv11.14b",     0x0000, 0x4000, 0x05f1a0e3 )
  929.     ROM_LOAD( "gv12.15b",     0x4000, 0x8000, 0x5b7a0d6d )
  930.  
  931.     ROM_REGION( 0x04000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  932.     ROM_LOAD( "gv4.13d",      0x00000, 0x4000, 0x162490b4 ) /* chars */
  933.  
  934.     ROM_REGION( 0x20000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  935.     ROM_LOAD( "gv7.14f",      0x00000, 0x8000, 0xeaa1a0db ) /* tiles */
  936.     ROM_LOAD( "gv8.15f",      0x08000, 0x8000, 0xf174a41e )
  937.     ROM_LOAD( "gv9.17f",      0x10000, 0x8000, 0xedc60f5d )
  938.     ROM_LOAD( "gv10.19f",     0x18000, 0x8000, 0x41f27fca )
  939.  
  940.     ROM_REGION( 0x10000, REGION_GFX3 | REGIONFLAG_DISPOSE )
  941.     ROM_LOAD( "gv14.4f",      0x00000, 0x8000, 0x03e2229f ) /* sprites */
  942.     ROM_LOAD( "gv13.1f",      0x08000, 0x8000, 0xbca9e66b )
  943.  
  944.     ROM_REGION( 0x8000, REGION_GFX4 )    /* background tilemaps */
  945.     ROM_LOAD( "gv6.19d",      0x0000, 0x4000, 0xda38168b )
  946.     ROM_LOAD( "gv5.17d",      0x4000, 0x4000, 0x22492d2a )
  947.  
  948.     ROM_REGION( 0x0500, REGION_PROMS )
  949.     ROM_LOAD( "mb7114e.9f",   0x0000, 0x0100, 0xde782b3e )    /* red */
  950.     ROM_LOAD( "mb7114e.10f",  0x0100, 0x0100, 0x0ae2a857 )    /* green */
  951.     ROM_LOAD( "mb7114e.11f",  0x0200, 0x0100, 0x7ba8b9d1 )    /* blue */
  952.     ROM_LOAD( "mb7114e.2d",   0x0300, 0x0100, 0x75466109 )    /* sprite lookup table */
  953.     ROM_LOAD( "mb7114e.7f",   0x0400, 0x0100, 0x06538736 )    /* sprite palette bank */
  954. ROM_END
  955.  
  956. ROM_START( galivan2 )
  957.     ROM_REGION( 0x14000, REGION_CPU1 )        /* main cpu code */
  958.     ROM_LOAD( "e-1",          0x00000, 0x8000, 0xd8cc72b8 )
  959.     ROM_LOAD( "e-2",          0x08000, 0x4000, 0x9e5b3157 )
  960.     ROM_LOAD( "gv3.4b",       0x10000, 0x4000, 0x82f0c5e6 ) /* 2 banks at c000 */
  961.  
  962.     ROM_REGION( 0x10000, REGION_CPU2 )        /* sound cpu code */
  963.     ROM_LOAD( "gv11.14b",     0x0000, 0x4000, 0x05f1a0e3 )
  964.     ROM_LOAD( "gv12.15b",     0x4000, 0x8000, 0x5b7a0d6d )
  965.  
  966.     ROM_REGION( 0x04000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  967.     ROM_LOAD( "gv4.13d",      0x00000, 0x4000, 0x162490b4 ) /* chars */
  968.  
  969.     ROM_REGION( 0x20000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  970.     ROM_LOAD( "gv7.14f",      0x00000, 0x8000, 0xeaa1a0db ) /* tiles */
  971.     ROM_LOAD( "gv8.15f",      0x08000, 0x8000, 0xf174a41e )
  972.     ROM_LOAD( "gv9.17f",      0x10000, 0x8000, 0xedc60f5d )
  973.     ROM_LOAD( "gv10.19f",     0x18000, 0x8000, 0x41f27fca )
  974.  
  975.     ROM_REGION( 0x10000, REGION_GFX3 | REGIONFLAG_DISPOSE )
  976.     ROM_LOAD( "gv14.4f",      0x00000, 0x8000, 0x03e2229f ) /* sprites */
  977.     ROM_LOAD( "gv13.1f",      0x08000, 0x8000, 0xbca9e66b )
  978.  
  979.     ROM_REGION( 0x8000, REGION_GFX4 )    /* background tilemaps */
  980.     ROM_LOAD( "gv6.19d",      0x0000, 0x4000, 0xda38168b )
  981.     ROM_LOAD( "gv5.17d",      0x4000, 0x4000, 0x22492d2a )
  982.  
  983.     ROM_REGION( 0x0500, REGION_PROMS )
  984.     ROM_LOAD( "mb7114e.9f",   0x0000, 0x0100, 0xde782b3e )    /* red */
  985.     ROM_LOAD( "mb7114e.10f",  0x0100, 0x0100, 0x0ae2a857 )    /* green */
  986.     ROM_LOAD( "mb7114e.11f",  0x0200, 0x0100, 0x7ba8b9d1 )    /* blue */
  987.     ROM_LOAD( "mb7114e.2d",   0x0300, 0x0100, 0x75466109 )    /* sprite lookup table */
  988.     ROM_LOAD( "mb7114e.7f",   0x0400, 0x0100, 0x06538736 )    /* sprite palette bank */
  989. ROM_END
  990.  
  991. ROM_START( dangar )
  992.     ROM_REGION( 0x14000, REGION_CPU1 )        /* main cpu code */
  993.     ROM_LOAD( "dangar08.1b",  0x00000, 0x8000, 0xe52638f2 )
  994.     ROM_LOAD( "dangar09.3b",  0x08000, 0x4000, 0x809d280f )
  995.     ROM_LOAD( "dangar10.5b",  0x10000, 0x4000, 0x99a3591b )
  996.  
  997.     ROM_REGION( 0x10000, REGION_CPU2 )        /* sound cpu code */
  998.     ROM_LOAD( "dangar13.b14", 0x0000, 0x4000, 0x3e041873 )
  999.     ROM_LOAD( "dangar14.b15", 0x4000, 0x8000, 0x488e3463 )
  1000.  
  1001.     ROM_REGION( 0x04000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  1002.     ROM_LOAD( "dangar05.13d", 0x00000, 0x4000, 0x40cb378a )    /* chars */
  1003.  
  1004.     ROM_REGION( 0x20000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  1005.     ROM_LOAD( "dangar01.14f", 0x00000, 0x8000, 0xd59ed1f1 )  /* tiles */
  1006.     ROM_LOAD( "dangar02.15f", 0x08000, 0x8000, 0xdfdb931c )
  1007.     ROM_LOAD( "dangar03.17f", 0x10000, 0x8000, 0x6954e8c3 )
  1008.     ROM_LOAD( "dangar04.19f", 0x18000, 0x8000, 0x4af6a8bf )
  1009.  
  1010.     ROM_REGION( 0x10000, REGION_GFX3 | REGIONFLAG_DISPOSE )
  1011.     ROM_LOAD( "dangarxx.f4",  0x00000, 0x8000, 0x55711884 )  /* sprites */
  1012.     ROM_LOAD( "dangarxx.f1",  0x08000, 0x8000, 0x8cf11419 )
  1013.  
  1014.     ROM_REGION( 0x8000, REGION_GFX4 )    /* background tilemaps */
  1015.     ROM_LOAD( "dangar07.19d", 0x0000, 0x4000, 0x6dba32cf )
  1016.     ROM_LOAD( "dangar06.17d", 0x4000, 0x4000, 0x6c899071 )
  1017.  
  1018.     ROM_REGION( 0x0500, REGION_PROMS )
  1019.     ROM_LOAD( "82s129.9f",    0x0000, 0x0100, 0xb29f6a07 )    /* red */
  1020.     ROM_LOAD( "82s129.10f",   0x0100, 0x0100, 0xc6de5ecb )    /* green */
  1021.     ROM_LOAD( "82s129.11f",   0x0200, 0x0100, 0xa5bbd6dc )    /* blue */
  1022.     ROM_LOAD( "82s129.2d",    0x0300, 0x0100, 0xa4ac95a5 )    /* sprite lookup table */
  1023.     ROM_LOAD( "82s129.7f",    0x0400, 0x0100, 0x29bc6216 )    /* sprite palette bank */
  1024. ROM_END
  1025.  
  1026. ROM_START( dangar2 )
  1027.     ROM_REGION( 0x14000, REGION_CPU1 )        /* main cpu code */
  1028.     ROM_LOAD( "dangar2.016",  0x00000, 0x8000, 0x743fa2d4 )
  1029.     ROM_LOAD( "dangar2.017",  0x08000, 0x4000, 0x1cdc60a5 )
  1030.     ROM_LOAD( "dangar2.018",  0x10000, 0x4000, 0xdb7f6613 )
  1031.  
  1032.     ROM_REGION( 0x10000, REGION_CPU2 )        /* sound cpu code */
  1033.     ROM_LOAD( "dangar13.b14", 0x0000, 0x4000, 0x3e041873 )
  1034.     ROM_LOAD( "dangar14.b15", 0x4000, 0x8000, 0x488e3463 )
  1035.  
  1036.     ROM_REGION( 0x04000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  1037.     ROM_LOAD( "dangar2.011",  0x00000, 0x4000, 0xe804ffe1 )    /* chars */
  1038.  
  1039.     ROM_REGION( 0x20000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  1040.     ROM_LOAD( "dangar01.14f", 0x00000, 0x8000, 0xd59ed1f1 )  /* tiles */
  1041.     ROM_LOAD( "dangar02.15f", 0x08000, 0x8000, 0xdfdb931c )
  1042.     ROM_LOAD( "dangar03.17f", 0x10000, 0x8000, 0x6954e8c3 )
  1043.     ROM_LOAD( "dangar04.19f", 0x18000, 0x8000, 0x4af6a8bf )
  1044.  
  1045.     ROM_REGION( 0x10000, REGION_GFX3 | REGIONFLAG_DISPOSE )
  1046.     ROM_LOAD( "dangarxx.f4",  0x00000, 0x8000, 0x55711884 )  /* sprites */
  1047.     ROM_LOAD( "dangarxx.f1",  0x08000, 0x8000, 0x8cf11419 )
  1048.  
  1049.     ROM_REGION( 0x8000, REGION_GFX4 )    /* background tilemaps */
  1050.     ROM_LOAD( "dangar07.19d", 0x0000, 0x4000, 0x6dba32cf )
  1051.     ROM_LOAD( "dangar06.17d", 0x4000, 0x4000, 0x6c899071 )
  1052.  
  1053.     ROM_REGION( 0x0500, REGION_PROMS )
  1054.     ROM_LOAD( "82s129.9f",    0x0000, 0x0100, 0xb29f6a07 )    /* red */
  1055.     ROM_LOAD( "82s129.10f",   0x0100, 0x0100, 0xc6de5ecb )    /* green */
  1056.     ROM_LOAD( "82s129.11f",   0x0200, 0x0100, 0xa5bbd6dc )    /* blue */
  1057.     ROM_LOAD( "82s129.2d",    0x0300, 0x0100, 0xa4ac95a5 )    /* sprite lookup table */
  1058.     ROM_LOAD( "82s129.7f",    0x0400, 0x0100, 0x29bc6216 )    /* sprite palette bank */
  1059. ROM_END
  1060.  
  1061. ROM_START( dangarb )
  1062.     ROM_REGION( 0x14000, REGION_CPU1 )        /* main cpu code */
  1063.     ROM_LOAD( "8",            0x00000, 0x8000, 0x8136fd10 )
  1064.     ROM_LOAD( "9",            0x08000, 0x4000, 0x3ce5ec11 )
  1065.     ROM_LOAD( "dangar2.018",  0x10000, 0x4000, 0xdb7f6613 )
  1066.  
  1067.     ROM_REGION( 0x10000, REGION_CPU2 )        /* sound cpu code */
  1068.     ROM_LOAD( "dangar13.b14", 0x0000, 0x4000, 0x3e041873 )
  1069.     ROM_LOAD( "dangar14.b15", 0x4000, 0x8000, 0x488e3463 )
  1070.  
  1071.     ROM_REGION( 0x04000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  1072.     ROM_LOAD( "dangar2.011",  0x00000, 0x4000, 0xe804ffe1 )    /* chars */
  1073.  
  1074.     ROM_REGION( 0x20000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  1075.     ROM_LOAD( "dangar01.14f", 0x00000, 0x8000, 0xd59ed1f1 )  /* tiles */
  1076.     ROM_LOAD( "dangar02.15f", 0x08000, 0x8000, 0xdfdb931c )
  1077.     ROM_LOAD( "dangar03.17f", 0x10000, 0x8000, 0x6954e8c3 )
  1078.     ROM_LOAD( "dangar04.19f", 0x18000, 0x8000, 0x4af6a8bf )
  1079.  
  1080.     ROM_REGION( 0x10000, REGION_GFX3 | REGIONFLAG_DISPOSE )
  1081.     ROM_LOAD( "dangarxx.f4",  0x00000, 0x8000, 0x55711884 )  /* sprites */
  1082.     ROM_LOAD( "dangarxx.f1",  0x08000, 0x8000, 0x8cf11419 )
  1083.  
  1084.     ROM_REGION( 0x8000, REGION_GFX4 )    /* background tilemaps */
  1085.     ROM_LOAD( "dangar07.19d", 0x0000, 0x4000, 0x6dba32cf )
  1086.     ROM_LOAD( "dangar06.17d", 0x4000, 0x4000, 0x6c899071 )
  1087.  
  1088.     ROM_REGION( 0x0500, REGION_PROMS )
  1089.     ROM_LOAD( "82s129.9f",    0x0000, 0x0100, 0xb29f6a07 )    /* red */
  1090.     ROM_LOAD( "82s129.10f",   0x0100, 0x0100, 0xc6de5ecb )    /* green */
  1091.     ROM_LOAD( "82s129.11f",   0x0200, 0x0100, 0xa5bbd6dc )    /* blue */
  1092.     ROM_LOAD( "82s129.2d",    0x0300, 0x0100, 0xa4ac95a5 )    /* sprite lookup table */
  1093.     ROM_LOAD( "82s129.7f",    0x0400, 0x0100, 0x29bc6216 )    /* sprite palette bank */
  1094. ROM_END
  1095.  
  1096. ROM_START( ninjemak )
  1097.     ROM_REGION( 0x18000, REGION_CPU1 )    /* main cpu code */
  1098.     ROM_LOAD( "ninjemak.1",   0x00000, 0x8000, 0x12b0a619 )
  1099.     ROM_LOAD( "ninjemak.2",   0x08000, 0x4000, 0xd5b505d1 )
  1100.     ROM_LOAD( "ninjemak.3",   0x10000, 0x8000, 0x68c92bf6 )
  1101.  
  1102.     ROM_REGION( 0x10000, REGION_CPU2 )    /* sound cpu code */
  1103.     ROM_LOAD( "ninjemak.12",  0x0000, 0x4000, 0x3d1cd329 )
  1104.     ROM_LOAD( "ninjemak.13",  0x4000, 0x8000, 0xac3a0b81 )
  1105.  
  1106.     ROM_REGION( 0x08000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  1107.     ROM_LOAD( "ninjemak.4",   0x00000, 0x8000, 0x83702c37 )    /* chars */
  1108.  
  1109.     ROM_REGION( 0x20000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  1110.     ROM_LOAD( "ninjemak.8",   0x00000, 0x8000, 0x655f0a58 ) /* tiles */
  1111.     ROM_LOAD( "ninjemak.9",   0x08000, 0x8000, 0x934e1703 )
  1112.     ROM_LOAD( "ninjemak.10",  0x10000, 0x8000, 0x955b5c45 )
  1113.     ROM_LOAD( "ninjemak.11",  0x18000, 0x8000, 0xbbd2e51c )
  1114.  
  1115.     ROM_REGION( 0x20000, REGION_GFX3 | REGIONFLAG_DISPOSE )
  1116.     ROM_LOAD( "ninjemak.16",  0x00000, 0x8000, 0x8df93fed )  /* sprites */
  1117.     ROM_LOAD( "ninjemak.17",  0x08000, 0x8000, 0xa3efd0fc )
  1118.     ROM_LOAD( "ninjemak.14",  0x10000, 0x8000, 0xbff332d3 )
  1119.     ROM_LOAD( "ninjemak.15",  0x18000, 0x8000, 0x56430ed4 )
  1120.  
  1121.     ROM_REGION( 0x8000, REGION_GFX4 )    /* background tilemaps */
  1122.     ROM_LOAD( "ninjemak.7",   0x0000, 0x4000, 0x80c20d36 )
  1123.     ROM_LOAD( "ninjemak.6",   0x4000, 0x4000, 0x1da7a651 )
  1124.  
  1125.     ROM_REGION( 0x4000, REGION_GFX5 )    /* data for mcu/blitter? */
  1126.     ROM_LOAD( "ninjemak.5",   0x0000, 0x4000, 0x5f91dd30 )    /* text layer data */
  1127.  
  1128.     ROM_REGION( 0x0500, REGION_PROMS )    /* Region 3 - color data */
  1129.     ROM_LOAD( "ninjemak.pr1", 0x0000, 0x0100, 0x8a62d4e4 )    /* red */
  1130.     ROM_LOAD( "ninjemak.pr2", 0x0100, 0x0100, 0x2ccf976f )    /* green */
  1131.     ROM_LOAD( "ninjemak.pr3", 0x0200, 0x0100, 0x16b2a7a4 )    /* blue */
  1132.     ROM_LOAD( "yncp-2d.bin",  0x0300, 0x0100, BADCRC( 0x23bade78 ) )    /* sprite lookup table */
  1133.     ROM_LOAD( "yncp-7f.bin",  0x0400, 0x0100, BADCRC( 0x262d0809 ) )    /* sprite palette bank */
  1134. ROM_END
  1135.  
  1136. ROM_START( youma )
  1137.     ROM_REGION( 0x18000, REGION_CPU1 )    /* main cpu code */
  1138.     ROM_LOAD( "ync-1.bin",    0x00000, 0x8000, 0x0552adab )
  1139.     ROM_LOAD( "ync-2.bin",    0x08000, 0x4000, 0xf961e5e6 )
  1140.     ROM_LOAD( "ync-3.bin",    0x10000, 0x8000, 0x9ad50a5e )
  1141.  
  1142.     ROM_REGION( 0x10000, REGION_CPU2 )    /* sound cpu code */
  1143.     ROM_LOAD( "ninjemak.12",  0x0000, 0x4000, 0x3d1cd329 )
  1144.     ROM_LOAD( "ninjemak.13",  0x4000, 0x8000, 0xac3a0b81 )
  1145.  
  1146.     ROM_REGION( 0x08000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  1147.     ROM_LOAD( "ync-4.bin",    0x00000, 0x8000, 0xa1954f44 )    /* chars */
  1148.  
  1149.     ROM_REGION( 0x20000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  1150.     ROM_LOAD( "ninjemak.8",   0x00000, 0x8000, 0x655f0a58 ) /* tiles */
  1151.     ROM_LOAD( "ninjemak.9",   0x08000, 0x8000, 0x934e1703 )
  1152.     ROM_LOAD( "ninjemak.10",  0x10000, 0x8000, 0x955b5c45 )
  1153.     ROM_LOAD( "ninjemak.11",  0x18000, 0x8000, 0xbbd2e51c )
  1154.  
  1155.     ROM_REGION( 0x20000, REGION_GFX3 | REGIONFLAG_DISPOSE )
  1156.     ROM_LOAD( "ninjemak.16",  0x00000, 0x8000, 0x8df93fed )  /* sprites */
  1157.     ROM_LOAD( "ninjemak.17",  0x08000, 0x8000, 0xa3efd0fc )
  1158.     ROM_LOAD( "ninjemak.14",  0x10000, 0x8000, 0xbff332d3 )
  1159.     ROM_LOAD( "ninjemak.15",  0x18000, 0x8000, 0x56430ed4 )
  1160.  
  1161.     ROM_REGION( 0x8000, REGION_GFX4 )    /* background tilemaps */
  1162.     ROM_LOAD( "ninjemak.7",   0x0000, 0x4000, 0x80c20d36 )
  1163.     ROM_LOAD( "ninjemak.6",   0x4000, 0x4000, 0x1da7a651 )
  1164.  
  1165.     ROM_REGION( 0x4000, REGION_GFX5 )    /* data for mcu/blitter? */
  1166.     ROM_LOAD( "ync-5.bin",    0x0000, 0x4000, 0x993e4ab2 )    /* text layer data */
  1167.  
  1168.     ROM_REGION( 0x0500, REGION_PROMS )    /* Region 3 - color data */
  1169.     ROM_LOAD( "yncp-6e.bin",  0x0000, 0x0100, 0xea47b91a )    /* red */
  1170.     ROM_LOAD( "yncp-7e.bin",  0x0100, 0x0100, 0xe94c0fed )    /* green */
  1171.     ROM_LOAD( "yncp-8e.bin",  0x0200, 0x0100, 0xffb4b287 )    /* blue */
  1172.     ROM_LOAD( "yncp-2d.bin",  0x0300, 0x0100, 0x23bade78 )    /* sprite lookup table */
  1173.     ROM_LOAD( "yncp-7f.bin",  0x0400, 0x0100, 0x262d0809 )    /* sprite palette bank */
  1174. ROM_END
  1175.  
  1176.  
  1177.  
  1178. GAME( 1985, galivan,  0,        galivan,  galivan,  0, ROT270, "Nichibutsu", "Galivan - Cosmo Police (12/16/1985)" )
  1179. GAME( 1985, galivan2, galivan,  galivan,  galivan,  0, ROT270, "Nichibutsu", "Galivan - Cosmo Police (12/11/1985)" )
  1180. GAME( 1986, dangar,   0,        galivan,  dangar,   0, ROT270, "Nichibutsu", "Dangar - Ufo Robo (12/1/1986)" )
  1181. GAME( 1986, dangar2,  dangar,   galivan,  dangar2,  0, ROT270, "Nichibutsu", "Dangar - Ufo Robo (9/26/1986)" )
  1182. GAME( 1986, dangarb,  dangar,   galivan,  dangarb,  0, ROT270, "bootleg", "Dangar - Ufo Robo (bootleg)" )
  1183. GAME( 1986, ninjemak, 0,        ninjemak, ninjemak, 0, ROT270, "Nichibutsu", "Ninja Emaki (US)" )
  1184. GAME( 1986, youma,    ninjemak, ninjemak, youma,    0, ROT270, "Nichibutsu", "Youma Ninpou Chou (Japan)" )
  1185.  
  1186.